In [ ]:
# Import necessary libraries
import numpy as np
from reservoirpy import nodes, datasets, observables
import reservoirpy as rpy
rpy.verbosity(0)
#rpy.set_seed(42)
import hierarchical_genomes as hg
import networkx as nx
import matplotlib.pyplot as plt
import copy
import random
#import json
# Loading configuration
#with open('config.json', 'r') as config_file:
# config = json.load(config_file)
# Example of accessing a config value
#population_size = config['population_size']
# Import functions from helper file
from expt_helper_functions import create_initial_genome, select_best_genomes, reproduce, log_generation_results, analyze_results,mae,mse,calculate_diversity_score, should_increase_timestep,visualize_genome
# Set up the main parameters
population_size = 100 #50
n_generations = 200 #100
mutation_probability = 0.1
insertion_probability = 0.1
# Define the number of input and output nodes for your neural network
#num_input_nodes = 10
#num_output_nodes = 10
# Load the Mackey-Glass dataset with specified timesteps
n_timesteps = 2000
X = datasets.mackey_glass(n_timesteps=n_timesteps, sample_len=2000)
num_input_nodes = X.shape[1] # Dynamically set based on the number of features in X
num_output_nodes = 1
train_end = int(len(X) * 0.7)
test_start = train_end + 1
# Automatic timestep calculation
train_split = 0.5
train_timesteps = int(train_split * n_timesteps)
test_timesteps = train_timesteps + 1
timestep_increment = 10
elitism_factor = 0.1 # Assuming you want to carry over 10% of the population
num_elites = int(elitism_factor * population_size)
# Initialize your population
genome_population = [create_initial_genome() for _ in range(population_size)]
# Define a fitness evaluation function
def evaluate_fitness(genome):
# Convert genome to neural network (function from your thesis code)
weight_matrix = hg.transcribe_hierarchical_genome_to_weight_matrix(genome)
# Setup the Echo State Network
#esn = nodes.Reservoir(W=weight_matrix) >> nodes.Ridge(ridge=1e-6)
# Setup the Echo State Network with explicit Win and bias
#esn = nodes.Reservoir(Win=np.ones((num_input_nodes, 1)), W=weight_matrix, bias=np.zeros((len(weight_matrix), 1))) >> nodes.Ridge(ridge=1e-6)
num_reservoir_nodes = weight_matrix.shape[0] # Assuming weight_matrix is a square matrix
num_input_features = 1 # Adjust based on your specific input features
# Setup the Echo State Network with adjusted Win and bias
esn = nodes.Reservoir(Win=np.ones((num_reservoir_nodes, num_input_features)), W=weight_matrix, bias=np.zeros((num_reservoir_nodes, 1))) >> nodes.Ridge(ridge=1e-6)
# Train and forecast using the ESN
#forecast = esn.fit(X[:500], X[1:501]).run(X[503:])
# Calculate fitness (e.g., using RMSE)
#fitness_score = observables.rmse(forecast, X[503:])
# Train and forecast using the ESN
forecast = esn.fit(X[:train_end], X[1:train_end+1]).run(X[test_start:])
# Calculate fitness (using RMSE and MAE)
fitness_rmse = observables.rmse(forecast, X[test_start:])
fitness_mae = mae(forecast, X[test_start:])
fitness_mse = mse(forecast, X[test_start:])
return {'rmse': fitness_rmse, 'mae': fitness_mae, 'mse': fitness_mse}
#complexity_penalty = len(genome) * 0.05 #complexity_penalty_rate (0.01 to 0.05) # Define complexity_penalty_rate
#return {'rmse': fitness_rmse + complexity_penalty, 'mae': fitness_mae, 'mse': fitness_mse}
#return fitness_score
# Track best fitness score per generation
best_fitness_scores = []
# Initialize arrays to store the best RMSE and MAE scores
best_rmse_scores = []
best_mae_scores = []
best_mse_scores = []
previous_best_score = float('inf')
# Early stopping parameters
stagnation_threshold = 10 # Number of generations without improvement
stagnation_counter = 0 # Counter for stagnation
diversity_scores = []
# Timesteps
initial_timestep = 1000 # Define an initial value for the timestep
current_timestep = initial_timestep # Define an initial timestep
timestep_increment = 1 # Define how much to increase timesteps each time
stagnation_threshold = 10 # Number of generations to consider for stagnation
increment_interval = 5 # Check for stagnation every 5 generations
# Evolutionary loop
for generation in range(n_generations):
# Load and preprocess data with current timestep
#X = datasets.mackey_glass(current_timestep, sample_len=1000)
fitness_scores = [evaluate_fitness(genome) for genome in genome_population]
#generation_best_score = min(fitness_scores, key=lambda x: x['rmse'])['rmse']
#best_fitness_scores.append(generation_best_score)
best_rmse = min(fitness_scores, key=lambda x: x['rmse'])['rmse']
best_mae = min(fitness_scores, key=lambda x: x['mae'])['mae']
best_mse = min(fitness_scores, key=lambda x: x['mse'])['mse']
# Check for early stopping if the best score doesn't improve
# if best_rmse >= previous_best_score:
# stagnation_counter += 1
# else:
# stagnation_counter = 0
# previous_best_score = best_rmse
# if stagnation_counter >= 10: # stop if no improvement in 10 generations
# print(f"Early stopping at generation {generation} due to lack of improvement.")
# break
# Early stopping logic
# if fitness_scores and fitness_scores[0]['rmse'] < previous_best_score:
# previous_best_score = fitness_scores[0]['rmse']
# stagnation_counter = 0
# else:
# stagnation_counter += 1
# if stagnation_counter >= stagnation_threshold:
# print(f"\nEarly stopping at generation {generation} due to lack of improvement.")
# break
# Logic to increase timestep
if should_increase_timestep(generation, best_fitness_scores, stagnation_threshold, increment_interval):
current_timestep += timestep_increment
print(f"Increasing timestep to {current_timestep}")
# if should_increase_timestep(generation, best_fitness_scores, 10, 5):
# n_timesteps += 1 # Increase complexity
# X = datasets.mackey_glass(n_timesteps=n_timesteps, sample_len=n_timesteps)
# train_end = int(len(X) * 0.7)
# test_start = train_end + 1
best_rmse_scores.append(best_rmse)
best_mae_scores.append(best_mae)
best_mse_scores.append(best_mse)
#best_fitness_scores.append(best_rmse)
#print(f"Generation {generation}: Best Fitness Score: {generation_best_score}")
selected_genomes = select_best_genomes(genome_population, fitness_scores)
# Instead of visualize_genome(selected_genomes), use:
best_genome = select_best_genomes(genome_population, fitness_scores, 1)[0] # Get the best genome
visualize_genome(best_genome) # Visualize the best genome
# Calculate and record the population's genetic diversity for this generation
#current_diversity_score = calculate_diversity_score(genome_population)
#diversity_scores.append(current_diversity_score)
#print(f"Generation {generation}: Diversity Score: {current_diversity_score}")
# Update the call to 'reproduce' to include node counts
#new_population = reproduce(selected_genomes, population_size, mutation_probability, num_input_nodes, num_output_nodes, num_elites)
#genome_population = new_population
genome_population = reproduce(selected_genomes, population_size, mutation_probability, num_input_nodes, num_output_nodes, num_elites)
# Select a genome for visualization
genome_for_visualization = copy.deepcopy(random.choice(genome_population))
visualize_genome(genome_for_visualization) # Visualize before mutation
# Mutate and visualize
mutated_genome = reproduce([genome_for_visualization], 1, mutation_probability, num_input_nodes, num_output_nodes, 0)[0]
visualize_genome(mutated_genome) # Visualize after mutation
# Correct file path for logging
#log_path = "/Users/chaitravshetty/Downloads/Advanced-Genomes-for-Evolutionary-Computing-main 3/hierarchical_genomes/evolution_log.txt"
log_path = "evolution_log.txt"
log_generation_results(generation, selected_genomes, fitness_scores, log_file=log_path)
# Perform post-experiment analysis with the correct file path
#analyze_log_path = "/Users/chaitravshetty/Downloads/Advanced-Genomes-for-Evolutionary-Computing-main 3/hierarchical_genomes/evolution_log.txt"
analyze_log_path = "evolution_log.txt"
analyze_results(log_file=analyze_log_path, best_rmse_scores=best_rmse_scores, best_mae_scores=best_mae_scores, best_mse_scores=best_mse_scores)
Warning: Mismatch in the number of generations and recorded scores. Generation 0: Best RMSE Score: 0.026953289967973144, Best MAE Score: 0.0210699678639249, Best MSE Score: 0.0007264798400976417 Generation 1: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 2: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 3: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 4: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 5: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 6: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 7: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 8: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 9: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 10: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 11: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 12: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 13: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 14: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 15: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 16: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 17: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 18: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 19: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 20: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 21: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 22: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 23: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 24: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 25: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 26: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 27: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 28: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 29: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 30: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 31: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 32: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 33: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 34: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 35: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 36: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 37: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 38: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 39: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 40: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 41: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 42: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 43: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 44: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 45: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 46: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 47: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 48: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 49: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 50: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 51: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 52: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 53: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 54: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 55: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 56: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 57: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 58: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 59: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 60: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 61: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 62: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 63: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 64: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 65: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 66: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 67: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 68: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 69: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 70: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 71: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 72: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 73: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 74: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 75: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 76: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 77: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 78: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 79: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 80: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 81: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 82: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 83: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 84: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 85: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 86: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 87: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 88: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 89: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 90: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 91: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 92: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 93: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 94: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 95: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 96: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 97: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 98: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 99: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 0: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 1: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 2: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 3: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 4: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 5: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 0: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 1: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 2: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 3: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 4: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 5: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 6: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 7: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 8: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 9: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 10: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 11: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 12: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 13: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 14: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 15: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 16: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 17: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 18: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 19: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 20: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 21: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 22: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 23: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 24: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 25: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 26: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 27: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 28: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 29: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 30: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 31: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 32: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 33: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 34: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 35: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 36: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 37: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 38: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 39: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 40: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 41: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 42: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 43: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 44: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 45: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 46: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 47: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 48: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 49: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 50: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 51: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 52: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 53: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 54: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 55: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 56: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 57: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 58: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 59: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 60: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 61: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 62: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 63: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 64: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 65: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 66: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 67: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 68: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 69: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 70: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 71: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 72: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 73: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 74: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 75: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 76: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 77: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 78: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 79: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 80: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 81: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 82: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 83: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 84: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 85: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 86: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 87: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 88: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 89: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 90: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 91: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 92: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Generation 93: Best RMSE Score: 0.02913240278653617, Best MAE Score: 0.022185245838350943, Best MSE Score: 0.0008486968921169806 Average top RMSE score: 0.029121507222443353 Average top MAE score: 0.022179669448478812 Average top MSE score: 0.0008480858068568839